unit InputBoxfrm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Basefrm, StdCtrls, Buttons;

type
  TInputBoxDlg = class(TBaseDlg)
    btn1: TBitBtn;
    btn2: TBitBtn;
    lbl1: TLabel;
    edt1: TEdit;
  private
    { Private declarations }
  public
    { Public declarations }
  end;


  function ShowInputBox(ACaption:string;var AVar:string):Boolean;

implementation

{$R *.dfm}



  function ShowInputBox(ACaption:string;var AVar:string):Boolean;
  begin
    with TInputBoxDlg.Create(nil) do
    try
      lbl1.Caption := ACaption;
      edt1.Text := AVar;
      Result := ShowModal = mrOk;
      if Result then
        AVar := edt1.Text;
    finally
      Free;
    end;
  end;
end.
